﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Ccit.OA.Utils;
using Ccit.OA.MsAddrBook;
using Newtonsoft.Json;
using Ccit.Utils;
namespace Ccit.OA.AddrBook
{
    public partial class addrbook_group_select : Ccit.Utils.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                _hidsRecId.Value = (Request.QueryString["Id"] !=null) ? Request.QueryString["Id"].ToString() : "";
                InitPage();
            }
        } 
        private void InitPage()
        {
            LoginUser login = (LoginUser)HttpContext.Current.Session["LogUserInfo"];
            CtrInterface.BindDropDown(ref ddlGroup, "ADDR_A2", "ADDR_A2_10", "ADDR_A2_30", false, "", "ADDR_A2_20=" + login.UserId + "");
        }
        #region Ajax Methods
        [global::System.Web.Services.WebMethod]
        public static string DoSaveMes(string strJson)
        {
            AddrBookBLL Bll = new AddrBookBLL();
            MsAddBooks ms = (MsAddBooks)JavaScriptConvert.DeserializeObject(strJson, typeof(MsAddBooks));
            string iNum = Bll.DaUpdateAddBookGroup(ms);
            Bll = null;
            return iNum;
        }
        #endregion
    }
}
